<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
<div id="app">
    <div>商品数量 {{count}}</div>
    <button v-on:click="add"> 加一个 </button>
</div>
</body>
<script src="../../js/vue.js"></script>
<script>
    var vm = new Vue({
        el: '#app',
        data: {
            count: 0
        },
        methods: {
            add() {
                this.count = this.count + 1
            }
        }
    })
</script>
</html>
